<?php

class TagLibColl implements Iterator {
	
	protected $prefix;
	
	protected $tags;
	
	private $keys;
	
	private $position;
	
	public function __construct() {
		$this->position = 0;
		
		$this->tags = array ();
		
		$this->keys = array ();
		
		$this->prefix='';
	}
	
	/**
	 * @return unknown
	 */
	public function getPrefix() {
		return $this->prefix;
	}
	
	/**
	 * @param unknown_type $prefix
	 */
	public function setPrefix($prefix) {
		$this->prefix = $prefix;
	}

	
	public function addTag($class, $file) {
		$this->tags [$class] = $file;
	}
	
	public function getAllTags() {
		return $this->tags;
	}
	
	function rewind() {
		$this->keys = array_keys ( $this->tags );
		$this->position = 0;
	}
	
	function current() {
		return $this->tags [$this->keys [$this->position]];
	}
	
	function key() {
		return $this->keys [$this->position];
	}
	
	function next() {
		++ $this->position;
	
	}
	
	function valid() {
		return isset ( $this->keys [$this->position] );
	}

}

?>